Component({
  properties: {
    step: {
      type: Number,
      value: 1
    },
    min: {
      type: Number,
      value: 0
    },
    max: {
      type: Number,
      value: 100
    },
    value: {
      type: Number,
      value: 0
    },
    value2: {
      type: Number,
      value: 0
    },
  },
  ready: function() { this.queryHeight()},
  data: {
    totalTop: null,
    totalHeight: null,
    currentValue: 0,
    value2:0,
  },
  methods: {
    setCurrent: function(e){
      this.setData({
        currentValue: e.value,
        value2:e.value
      })
    },
    queryHeight: function(){
      wx.createSelectorQuery().in(this).select('#slider').boundingClientRect((res) => {
        this.setData({
          totalTop: res.top,
          totalHeight: res.height
        })
      }).exec()
    },
  }
})